package com.gzhryc.shared_device.oem.h5.agent.dto.api.v1.place;

import com.gzhryc.common.api.SecurityResponse;
import com.gzhryc.common.data.ITreeEntity;

import java.io.Serializable;
import java.util.List;

public class PlacePhysicalStoreTypeListResponse extends SecurityResponse<PlacePhysicalStoreTypeListResponse.Body> {

    public PlacePhysicalStoreTypeListResponse() {
        this.body = new Body();
    }

    public PlacePhysicalStoreTypeListResponse(Integer code, String msg) {
        super(code,msg);
        this.body = new Body();
    }

    public static class Body implements Serializable {

        public List<Item> items;

        public List<Item> getItems() {
            return items;
        }

        public void setItems(List<Item> items) {
            this.items = items;
        }
    }

    public static class Item implements ITreeEntity<PlacePhysicalStoreTypeListResponse.Item,Long> {

        private Long id;
        private String code;
        private String name;
        private Long parentId;
        private List<Item> children;

        @Override
        public Long getId() {
            return id;
        }

        public void setId(Long id) {
            this.id = id;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        @Override
        public Long getParentId() {
            return parentId;
        }

        public void setParentId(Long parentId) {
            this.parentId = parentId;
        }

        @Override
        public List<Item> getChildren() {
            return children;
        }

        @Override
        public void setChildren(List<Item> children) {
            this.children = children;
        }
    }
}
